# schemas/sys_api_teamwork.py
from pydantic import BaseModel
from typing import Optional


class SysApiTeamworkBase(BaseModel):
    api_id: Optional[str] = None
    user_id: Optional[str] = None
    is_admin: Optional[int] = None
    is_activate: Optional[int] = 1
    disable_date: Optional[str] = None

    deletion_mark: Optional[int] = 0
    deletion_reason: Optional[str] = None
    deletion_date: Optional[str] = None
    deletion_by: Optional[str] = None
    creator_by: Optional[str] = None
    last_updated_by: Optional[str] = None


class SysApiTeamworkCreate(SysApiTeamworkBase):
    pass


class SysApiTeamworkUpdate(SysApiTeamworkBase):
    pass


class SysApiTeamwork(SysApiTeamworkBase):
    id: str
    create_date: str
    last_updated_date: Optional[str] = None

    class Config:
        from_attributes = True
